Skip to main content
Version: v2.10.0

Post-Deployment

The stack reports success before the platform is ready, so the work isn't quite finished when CloudFormation goes green. What's left divides neatly in two. First we read the outputs and the secrets to find out where everything landed, then we watch the bootstrap finish on the instance itself. Anyone running with EnableHttps set to true has one extra job, because the certificate points at a DNS name that doesn't resolve to the instance yet.

Start with the outputs.

1. Read the stack outputs

There are 13 outputs, four of which appear only under the right conditions.

aws cloudformation describe-stacks --stack-name yeedu-platform \
--query 'Stacks[0].Outputs' --output table
OutputConditionValue
VpcIdalwaysThe VPC you passed in.
Ec2SubnetIdalwaysThe EC2 and EFS subnet.
RdsSubnetIdsRdsCreate is trueBoth RDS subnet IDs, comma-joined.
InstanceIdalwaysThe YeeduInstance instance ID.
InstancePrivateIpalwaysPrivate IPv4 address of the instance.
InstancePublicIpAssignPublicIp is truePublic IPv4 address.
InstanceElasticIpAssignPublicIp is trueThe allocated Elastic IP.
ApplicationEndpointalwaysCustomDnsName with HTTPS on, otherwise the public or private DNS name of the instance.
RdsEndpointalwaysDatabase address, or the literal string Not Created.
S3BucketNamealways${AWS::StackName}-data.
EfsIdalwaysThe EFS file system ID.
YeeduUserAccessKeyalwaysAccess key ID for the generated IAM user.
YeeduUserSecretKeyalwaysSecret access key for that user.
warning

That last output is a live secret access key sitting in plain text in the stack outputs. Anyone with cloudformation:DescribeStacks on this stack can read it. The same pair is stored properly in Secrets Manager, so we'd treat the output as something to lock down with IAM rather than something to copy around.

2. Point DNS at the instance, if you enabled HTTPS

With EnableHttps set to true, the bootstrap writes CustomDnsName into the REST API, UI, history server and functions proxy hostnames, and copies your certificate and key out of S3 into /opt/Core-Services-Formation/ssl as yeedu.crt and yeedu.key. Nothing creates the DNS record for you. Create an A record for that name pointing at the Elastic IP from InstanceElasticIp, or a CNAME to the instance DNS name, and the certificate will match what browsers actually request.

3. Read the secrets

Three secrets are created, and two of them are named predictably from the stack name and environment.

# IAM access key pair used by the platform
aws secretsmanager get-secret-value \
--secret-id yeedu-platform-dev-yeedu-config-secret \
--query SecretString --output text

# Database endpoint, port, user, password and database name
aws secretsmanager get-secret-value \
--secret-id yeedu-platform-dev-yeedu-rds-secret \
--query SecretString --output text

YeeduDbSecret holds the generated master password and gets an AWS-assigned name rather than one from the template. Its username field is yeedu, and the password is 16 characters generated with a long exclusion list, so no shell-hostile characters end up in it. When RdsCreate is false, every field in the RDS secret is written as an empty string, and the bootstrap skips writing yeedu-connection.properties altogether, leaving the platform on its packaged database configuration.

4. Confirm the bootstrap finished

SSH to the instance using the key pair named in Ec2KeyName, then read the log. Everything the user data script does is teed to /var/log/bootstrap.log, including the AWS CLI v2 install and the Docker Compose 1.29.2 download.

sudo tail -f /var/log/bootstrap.log

If you'd rather not log in, the CloudWatch agent installed during boot ships /var/log/cloud-init-output.log to the yeedu_userdata_logs group, so the same story is readable from the console. That group only exists when CreateLogGroups is true, or when it was retained from an earlier stack.

The script finishes by running ./yeedu-core-services.sh start from /opt/Core-Services-Formation. Three files there are worth checking, since they're generated from your parameters and the two secrets.

FileWhat it holds
/etc/yeedu-envAWS credentials and region, account ID, S3 bucket, EFS ID and DNS name, RDS connection values, public and HTTPS flags.
/opt/Core-Services-Formation/yeedu-system-config.propertiesRegistry provider and URL, cloud provider, project ID, object storage bucket, NFS hostname and mount target.
/opt/Core-Services-Formation/yeedu-connection.propertiesPostgreSQL host, port, database, user and password, plus the hostnames and SSL flags for each service. Written only when an RDS endpoint is present.
sudo docker ps

Every service should be listed and running.

5. Tighten the security group

The instance security group ships wide open. Every rule below uses 0.0.0.0/0 as its source, which is deliberate for a quick evaluation and much too permissive for anything else, so restricting these to your own CIDR ranges is the first hardening step we'd take on a stack that's going to stay up.

PortService
22SSH
80, 443HTTP and HTTPS
389LDAP
3000Grafana
5172Functions service
5173Yeedu UI
5432PostgreSQL
5672, 15672RabbitMQ messaging and management UI
6379Redis
8080REST API
8081Airflow UI
8086InfluxDB
8200Vault API
8765Proxy cacher
8888-9088Jupyter workspaces
10000History server

The database and file system groups are already tight. Both accept traffic only from the EC2 security group, PostgreSQL on 5432 and NFS on 2049.

One more thing worth reviewing. The bootstrap creates a yeedu operating system user with passwordless sudo and writes a Yeedu-supplied public key into its authorized_keys, which is how support reaches the box. Remove it if that isn't wanted.